﻿@using HopNguyenCms.Infrastructure
@model IEnumerable<HopNguyenModel.PaginationContent_Result>
@{
    Layout = "~/Views/Shared/_FrontendLayout.cshtml";
    var pagination = ViewBag.Pagination;
    var page = ViewBag.Page;
    var sort = ViewBag.Sort ?? "";
    var i = 0;
}
@section SEO{
    <title>Popular videos on Youtube @(page > 1 ? "- Page " + page : "")</title>
    <meta name="description" content="All music videos, trailers, comedy clips, movies and everything else on Youtube that people are most concerned @(page > 1 ? "- page " + page : "")"/>
    <link rel="canonical" href="@Request.Url" />
    <meta property='og:type' content='article' />
    <meta property='og:title' content='Popular videos on Youtube @(page > 1 ? "- Page " + page : "")'/>
    <meta property='og:description' content='All music videos, trailers, comedy clips, movies and everything else on Youtube that people are most concerned @(page > 1 ? "- page " + page : "")'/>
    <meta property='og:url' content='@Request.Url'/>
    <meta property='og:site_name' content='Get link Youtube' />
}
<section id="main" class="col-left">
    <article id="contact-page" class="page">
        <div class="row-fluid popular-header">
            <div class="span5">
                <h1>Popular videos</h1>
            </div>
            <div class="span7 pnsort">
                Sort by
                <select onchange="window.location='?sort='+this.value" class="sort-video">
                    <option value="id">Latest Download</option>
                    <option value="hit" @(sort.Equals("hit") ? "selected=selected" : "")>Top View</option>
                    <option value="download" @(sort.Equals("download") ? "selected=selected" : "")>Top Download</option>
                </select>
            </div>
        </div>
        <section class="entry">
            <div class="row-fluid video-item">
                @foreach (var item in Model)
                {
                    <div class="span4">
                        <div class="video-image">
                            <a href="@AppSettings.CurrentDomain@item.UrlVideo" title="@item.Name">
                                <img src="http://i3.ytimg.com/vi/@(item.Alias)/0.jpg" alt="@item.Name"/>

                                <div class="duaration">@item.Summary</div>
                                <div class="play">
                                    <img src="/frontend/img/play.png" alt="play video" />
                                </div>
                            </a>
                        </div>
                        <h5><a href="@AppSettings.CurrentDomain@item.UrlVideo" title="@item.Name">@item.Name</a></h5>
                    </div>
                    i++;
                    if (i % 3 == 0)
                    {
                    @Html.Raw("</div><div class=\"row-fluid video-item\">")
                    }
                }
            </div>
            @Html.Raw(pagination)
        </section>
    </article>
</section>